package com.gaoxinfu.demo.spring.cloud.jpa.customize.entity;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;

@Data
@Entity
@Table(name = "dept")
@Accessors(chain = true)
public class Dept implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @Id
    @ApiModelProperty("主键")
    @Column(name = "id", nullable = false)
    private Long id;

    /**
     * 部门编号
     */
    @Column(name = "deptno")
    @ApiModelProperty("部门编号")
    private Integer deptno;

    /**
     * 部门名称
     */
    @Column(name = "dname")
    @ApiModelProperty("部门名称")
    private String dname;

    /**
     * 部门所在地址
     */
    @Column(name = "loc")
    @ApiModelProperty("部门所在地址")
    private String loc;

}
